<?php

function hook_install() {
    $event_type = array(
        'type' => 'event',
        'name' => st('Event'),
        'base' => 'node_content',
        'description' => st('Create a new event.'),
        'custom' => TRUE,
        'modified' => TRUE,
        'locked' => FALSE,
    );

    $event_type = node_type_set_defaults($event_type);
    node_type_save($event_type);
    node_add_body_field($event_type);
}

function proba_theme_preprocess_node(&$variables) {
	$variables['meeting_description'] = theme('blocks', 'meeting_description');
    $variables['meeting_title'] = theme('blocks', 'meeting_title');
    $variables['meeting_date'] = theme('blocks', 'meeting_date');
    $variables['meeting_time'] = theme('blocks', 'meeting_time');
    $variables['meeting_place'] = theme('blocks', 'meeting_place');
    $variables['meeting_agenda'] = theme('blocks', 'meeting_agenda');
    $variables['meeting_preparation'] = theme('blocks', 'meeting_preparation');
    $variables['meeting_role_notes'] = theme('blocks', 'meeting_role_notes');
    $variables['meeting_role_photo'] = theme('blocks', 'meeting_role_photo');
    $variables['meeting_role_video'] = theme('blocks', 'meeting_role_video');
    $variables['meeting_role_chief_editor'] = theme('blocks', 'meeting_role_chief_editor');
    $variables['meeting_place'] = theme('blocks', 'meeting_place');
    $variables['meeting_map'] = theme('blocks', 'meeting_map');
    $variables['meeting_expert'] = theme('blocks', 'meeting_expert');
    $variables['meeting_place_description'] = theme('blocks', 'meeting_place_description');

    $variables['recommended_event'] = theme('block', 'recommended_event');
}

function proba_theme_preprocess_page(&$vars, $hook) {
    if (isset($vars['node'])) {
        $vars['theme_hook_suggestions'][] = 'page__'. str_replace('_', '--', $vars['node']->type);
    }
}
?>
